package cn.tsa.share.jdbc.shardingjdbc.hint;

/**
 * @author hongwei
 */
public class OrderHintParam implements Comparable<OrderHintParam> {

    private int[] index;

    public OrderHintParam(int... index) {
        this.index = index;
    }

    @Override
    public int compareTo(OrderHintParam o) {
        if (this.index.length == o.index.length) {
            return 0;
        } else if (this.index.length > o.index.length) {
            return 1;
        } else {
            return -1;
        }
    }

    public int[] getIndex() {
        return index;
    }
}

